1. Relative Deviation (Δrel %)
Quantifies the percentage difference between Spectra-X's fitted net peak area (ASpectraX) and PyMca 5.9.6's net peak area (APyMca):
Δrel (%) =
ASpectraX − APyMca
APyMca
× 100%
• Satisfactory Agreement: |Δrel| ≤ 2.0%
• Acceptable Agreement: 2.0% < |Δrel| ≤ 5.0%
• Discrepancy / Attention: |Δrel| > 5.0%
2. ISO/IEC 17043 Metrological Compatibility Number (En)
In analytical metrology and laboratory intercomparison (ISO/IEC 17043 / ISO 13528), two independent measurements or deconvolution codes cannot be evaluated simply by percentage difference without accounting for their statistical Poisson counting uncertainties (σ):
En =
| ASpectraX − APyMca |
√( σSpectraX2 + σPyMca2 )
• En ≤ 1.0 (Metrologically Equivalent): The discrepancy is smaller than the combined measurement uncertainty. The results are statistically indistinguishable from random Poisson counting statistics.
• 1.0 < En ≤ 1.5 (Warning / Acceptable): Borderline agreement, acceptable at the 95% confidence level (k = 2).
• En > 1.5 (Significant Deviation): The difference exceeds random counting noise and is attributable to physical modeling differences (e.g. SNIP baseline subtraction, Coster–Kronig cascade jump ratios, or subshell grouping).
3. Global Regression & Parity Slope (m)
Linear regression through the origin (y = m · x, where y = ASpectraX and x = APyMca):
m =
∑ (xi · yi)
∑ xi2
A parity slope of m = 1.0000 indicates zero global systematic bias. Values m > 1.00 indicate Spectra-X fitted slightly higher net counts (often due to tighter SNIP baseline subtraction), while m < 1.00 indicates PyMca integrated higher areas.
4. Mean Absolute Relative Difference (MARD) & RMSRE
MARD = 1N ∑ |Δrel, i|
|
RMSRE = √[ 1N ∑ (Δrel, i)2 ]
These global error metrics evaluate aggregate deconvolution accuracy across all major, minor, and trace characteristic peaks regardless of absolute count magnitude.
5. Why Do Minor Differences Occur Between Spectra-X and PyMca?
1. SNIP Baseline Window & Variance Transformation: PyMca often defaults to linear baseline smoothing or a fixed SNIP filter width, whereas Spectra-X uses Ryan & Morháč's variance-stabilizing Log-Log-Square-root (LLS) transform ln(ln(√(y + 1) + 1) + 1) with decreasing iterations. Minor baseline differences at low energies (E < 3 keV) can shift net counts by 1–3%.
2. FWHM Refinement vs. Fixed Noise: PyMca users frequently fix noise and Fano factor manually. Spectra-X performs non-linear Levenberg-Marquardt refinement on noise ENC and Fano factor, producing slightly sharper peaks and better χ².
3. Subshell Grouping Physics: In the L-shell, PyMca unified mode locks L1 + L2 + L3 together. When differential self-absorption occurs in thick matrices (such as Au or Ta), fitting L1, L2, L3 separately (as Spectra-X supports) accurately reproduces the experimental Lα / Lβ net intensity ratios.